import java.util.Scanner;

public class Fibonacci {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n;
        n = input.nextInt();
        int i;
        int sum=0;
        int arr[]= {1,1};
        int j = 0;
        for(i = 3;i <= n;i++)
        {

            sum = arr[0] + arr[1];
            arr[0] = arr[1];
            arr[1] = sum;

        }
        if(n<3)
        {
            System.out.println(1);
        }
        else
        System.out.printf("%d",arr[1]);

    }
}
